﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="tijiaobangongtongxunlu.aspx.cs" Inherits="qs_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>提交通讯录</title>
    <link href="../css/textarea.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
body {
	margin-top: 0px;
}
}
-->
</style>

<script type="text/javascript" language="javascript">
function check() 
{


 




 


if(document.form1.txtShouji.value!="")
{
    var mobile = document.form1.txtShouji.value;
    var myreg = /^(((13[0-9]{1})|159|(15[0-9]{1}))+\d{8})$/;
    if(mobile.length!=11)
    {
        alert("请输入合法的手机号码位数！");
        document.form1.txtShouji.value = "";
        document.form1.txtShouji.focus();
        return false;
    } 
    
      
    if(!myreg.test(mobile))
    {
        alert("请输入合法的手机号码！");
        document.form1.txtMobile.value = "";
        document.form1.txtMobile.focus();
        return false;
    }

}

if(document.form1.txtEmail.value !="")
{
    var pattern = /^([a-z0-9A-Z]+[-|\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\.)+[a-zA-Z]{2,}$/;
    var b = pattern.test(document.form1.txtEmail.value);
    if(b)
    {  
    }else
    {
        alert("eMail格式不正确! 如: wc840302@163.com"); 
        document.form1.txtEmail.value = "";
        document.form1.txtEmail.focus()
        return false;
    }            
}


   
if(document.form1.txtBangong.value!="")
{
    var str=document.form1.txtBangong.value;
    var reg=/(^[0-9]{3,4}\-[0-9]{3,8}$)|(^[0-9]{3,8}$)|(^\([0-9]{3,4}\)[0-9]{3,8}$)|(^0{0,1}13[0-9]{9}$)/
    if(reg.test(str))
    {
        alert("请输入合法的电话号码！如:01067231100");
        document.form1.txtBangong.value = "";
        document.form1.txtBangong.focus();
        return false;
    } 
    
}


if(document.form1.txtXiaolingtong.value!="")
{
    var str=document.form1.txtXiaolingtong.value;
    var reg=/(^[0-9]{3,4}\-[0-9]{3,8}$)|(^[0-9]{3,8}$)|(^\([0-9]{3,4}\)[0-9]{3,8}$)|(^0{0,1}13[0-9]{9}$)/
    if(reg.test(str))
    {
        alert("请输入合法的电话号码！如:01067231100");
        document.form1.txtXiaolingtong.value = "";
        document.form1.txtXiaolingtong.focus();
        return false;
    } 
    
}



if(document.form1.txtFenji.value!="")
{
    var str=document.form1.txtFenji.value;
    var reg=/(^[0-9]{3,4}\-[0-9]{3,8}$)|(^[0-9]{3,8}$)|(^\([0-9]{3,4}\)[0-9]{3,8}$)|(^0{0,1}13[0-9]{9}$)/
    if(reg.test(str))
    {
        alert("请输入合法的电话号码！如:01067231100");
        document.form1.txtFenji.value = "";
        document.form1.txtFenji.focus();
        return false;
    } 
    
}


}
</script>
</head>
<body>
    <form id="form1" runat="server" onsubmit="return check()" >
    <div>
    <div><table border="0" cellpadding="0" cellspacing="0" bgcolor="#5AAE18" style="width: 100%">
    <tr>
      <td width="6" height="21"><img alt=""  src="../../img/bbs/leftlin1.gif" width="6" height="21"/></td>
      <td width="936" bgcolor="#5AAE18"><div align="center"><span class="style3"><span class="style1">通 讯 录</span></span></div></td>
      <td height="21">&nbsp;</td>
    </tr>
  </table></div>
    
        <div align="center">
            <table bgcolor="#5aae18" border="0" cellpadding="3" cellspacing="1" width="100%">
                <tr>
                    <td bgcolor="#ffffff" >
                        <div align="left">
                            姓 名：</div>
                    </td>
                    <td bgcolor="#ffffff" >
                        <asp:DropDownList ID="ddlUname" runat="server" DataSourceID="SqlDataSource1"
                            DataTextField="u_username" DataValueField="u_id">
                        </asp:DropDownList>
                        &nbsp;<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:qs_OA_DBConnectionString1 %>"
                            SelectCommand="SELECT [u_id], [u_username] FROM [users]"></asp:SqlDataSource>
                        
                    </td>
                    <td bgcolor="#ffffff" >
                        职 务：
                        <asp:TextBox ID="txtZhiWu" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtZhiWu" ErrorMessage="职务不能为空">*</asp:RequiredFieldValidator>
                       
                        </td>
                        </tr>
                <tr>
                    <td bgcolor="#ffffff" >
                        <div align="left">
                            部门：</div>
                    </td>
                    <td bgcolor="#ffffff" >
                        <asp:DropDownList ID="ddlBumen" runat="server" DataSourceID="SqlDataSource2" DataTextField="dept_department"
                            DataValueField="dept_id">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:qs_OA_DBConnectionString3 %>"
                            SelectCommand="SELECT [dept_id], [dept_department] FROM [department]"></asp:SqlDataSource>
                        &nbsp;
                        
                    
                    </td>
                    <td bgcolor="#ffffff">
                        小灵通：
                        <asp:TextBox ID="txtXiaolingtong" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtXiaolingtong" ErrorMessage="小灵通不能为空">*</asp:RequiredFieldValidator>
                        </td>
                        </tr>
                <tr>
                    <td bgcolor="#ffffff">
                        <div align="left">
                            手 机：</div>
                    </td>
                    <td bgcolor="#ffffff">
                        <asp:TextBox ID="txtShouji" runat="server"></asp:TextBox>&nbsp;
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtShouji" ErrorMessage="手机不能为空">*</asp:RequiredFieldValidator></td>
                        
                        <td bgcolor="#ffffff">
                            办公电话：
                        <asp:TextBox ID="txtBangong" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtBangong" ErrorMessage="办公不能为空">*</asp:RequiredFieldValidator>
                        </td>
                        </tr>
                <tr>
                    <td bgcolor="#ffffff">
                        <div align="left">
                            分机：</div>
                    </td>
                    <td bgcolor="#ffffff">
                        <asp:TextBox ID="txtFenji" runat="server"></asp:TextBox>&nbsp;
                        </td>
                    <td bgcolor="#ffffff">
                        Email：
                        <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtEmail" ErrorMessage="EMAIL不能为空">*</asp:RequiredFieldValidator>
                        </td>
                </tr>
                <tr>
                    <td bgcolor="#ffffff" style="height: 33px">
                        <div align="left" >
                            传 真：</div>
                    </td>
                    <td bgcolor="#ffffff" style="height: 33px">
                        <asp:TextBox ID="txtChuanZhen" runat="server"></asp:TextBox>&nbsp;
                        </td>
                    <td bgcolor="#ffffff" style="height: 33px">
                        Msn：&nbsp;
                        <asp:TextBox ID="txtMsn" runat="server"></asp:TextBox>
                        </td>
                </tr>
                <tr>
                    <td bgcolor="#ffffff" style="height: 30px">
                        <div align="left">
                            Q Q：</div>
                    </td>
                    <td bgcolor="#ffffff" style="height: 30px">
                        <asp:TextBox ID="txtQQ" runat="server"></asp:TextBox>
                        &nbsp; &nbsp;
                        &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</td>
                    <td bgcolor="#ffffff" style="height: 30px">
                    </td>
                </tr>
                <tr>
                    <td bgcolor="#ffffff">
                        <div align="left">
                            地 址：</div>
                    </td>
                    <td bgcolor="#ffffff" colspan="2">
                        <asp:TextBox ID="txtAdd" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtAdd" ErrorMessage="地址不能为空">*</asp:RequiredFieldValidator>
                        </td>
                        </tr>
                <tr>
                    <td bgcolor="#ffffff" style="height: 111px">
                        <div align="right">
                            备 注：</div>
                    </td>
                    <td bgcolor="#ffffff" colspan="2" style="height: 111px">
                        <asp:TextBox ID="txtBeiZhu" runat="server" Height="84px" TextMode="MultiLine" Width="298px"></asp:TextBox>
                        </td>
                </tr>
                <tr>
                    <td bgcolor="#ffffff">
                        &nbsp;</td>
                    <td bgcolor="#ffffff" colspan="2">
                        <span class="style2"><span class="bg"><span class="bg style2"><strong><font color="#ffffff">
                            <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                    <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                        <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                            <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                    <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                        <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                            <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                                <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                                    <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                                        <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                                            <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                                                <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                                                    <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                                                        <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                                                            <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                                                                <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                                                                    <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                                                                        <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                                                                            <strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
                                                                                                                <strong><font color="#ffffff"><strong><font color="#ffffff">
                                                                                                                    <asp:Button ID="btTiJiao" runat="server" Text="添加" Width="87px" OnClick="btTiJiao_Click" />
                                                                                                                    <asp:Button ID="btChongZhi" runat="server" Text="重置" Width="73px" OnClick="btChongZhi_Click" CausesValidation="False" />&nbsp;<strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff"><strong><font color="#ffffff">
    </font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></span></span></span></td>
                </tr>
            </table>
        </div>
    
    </div>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server"
         ShowMessageBox="true" ShowSummary="false" />
    </form>
</body>
</html>
